using System;
using System.Data;
using System.Collections;
using APP.QUANLY.Common;

namespace RMAS.DAL
{
    /// <summary>
    /// Summary description for QT_EXPORTBILL.
    /// </summary>
    public class QT_EXPORTBILL
    {
              private string _BillID;
      private string _TypeBill;
      private DateTime _ExportDate;
      private Int32 _PayID;
      private string _Note;
      private string _TableID;
      private string _PromotionID;
      private decimal _PromotionMoney;
      private double _VAT;
      private decimal _TableMoney;
      private decimal _ServiceMoney;
      private decimal _OtherMoney;
      private double _TotalPay;
      private string _CusID;
      private string _CusName;
      private double _Paymented;
      private string _UserName;
      private string _IDPOS;
      private QT_EXPORTDETAIL_MENUList _listQT_EXPORTDETAIL_MENU;
      private QT_EXPORTDETAIL_MENU_TEMPList _listQT_EXPORTDETAIL_MENU_TEMP;
      private QT_EXPORTDETAIL_METERIALList _listQT_EXPORTDETAIL_METERIAL;
      private QT_EXPORTDETAIL_METERIAL_TEMPList _listQT_EXPORTDETAIL_METERIAL_TEMP;
      private QT_TABLERENTList _listQT_TABLERENT;
      private QT_TABLERENT_TEMPList _listQT_TABLERENT_TEMP;
        private bool isExisting;
        #region Properties
        public bool IsExisting
        {
              get{return isExisting;}
              set{isExisting = value;}
        }
	      public bool IsSetBillID; 
      public bool IsBillIDNullable   
      { 
	 get { return false;  } 
      }
      public string BillID
      {
         get { return _BillID; }
         set 
	    { 
 		 _BillID = value;
		IsSetBillID = true;
 	    }
      }
    public bool IsSetTypeBill; 
    public bool IsTypeBillNullable   
    { 
		get { return false;  } 
    }
    public string TypeBill
    {
        get{ return _TypeBill;  }
        set
		{
			_TypeBill = value;
			IsSetTypeBill = true;
		}
    }
    public bool IsSetExportDate; 
    public bool IsExportDateNullable   
    { 
		get { return false;  } 
    }
    public DateTime ExportDate
    {
        get{ return _ExportDate;  }
        set
		{
			_ExportDate = value;
			IsSetExportDate = true;
		}
    }
    public bool IsSetPayID; 
    public bool IsPayIDNullable   
    { 
		get { return false;  } 
    }
    public Int32 PayID
    {
        get{ return _PayID;  }
        set
		{
			_PayID = value;
			IsSetPayID = true;
		}
    }
    public bool IsSetNote; 
    public bool IsNoteNullable   
    { 
		get { return false;  } 
    }
    public string Note
    {
        get{ return _Note;  }
        set
		{
			_Note = value;
			IsSetNote = true;
		}
    }
    public bool IsSetTableID; 
    public bool IsTableIDNullable   
    { 
		get { return false;  } 
    }
    public string TableID
    {
        get{ return _TableID;  }
        set
		{
			_TableID = value;
			IsSetTableID = true;
		}
    }
    public bool IsSetPromotionID; 
    public bool IsPromotionIDNullable   
    { 
		get { return false;  } 
    }
    public string PromotionID
    {
        get{ return _PromotionID;  }
        set
		{
			_PromotionID = value;
			IsSetPromotionID = true;
		}
    }
    public bool IsSetPromotionMoney; 
    public bool IsPromotionMoneyNullable   
    { 
		get { return false;  } 
    }
    public decimal PromotionMoney
    {
        get{ return _PromotionMoney;  }
        set
		{
			_PromotionMoney = value;
			IsSetPromotionMoney = true;
		}
    }
    public bool IsSetVAT; 
    public bool IsVATNullable   
    { 
		get { return false;  } 
    }
    public double VAT
    {
        get{ return _VAT;  }
        set
		{
			_VAT = value;
			IsSetVAT = true;
		}
    }
    public bool IsSetTableMoney; 
    public bool IsTableMoneyNullable   
    { 
		get { return false;  } 
    }
    public decimal TableMoney
    {
        get{ return _TableMoney;  }
        set
		{
			_TableMoney = value;
			IsSetTableMoney = true;
		}
    }
    public bool IsSetServiceMoney; 
    public bool IsServiceMoneyNullable   
    { 
		get { return false;  } 
    }
    public decimal ServiceMoney
    {
        get{ return _ServiceMoney;  }
        set
		{
			_ServiceMoney = value;
			IsSetServiceMoney = true;
		}
    }
    public bool IsSetOtherMoney; 
    public bool IsOtherMoneyNullable   
    { 
		get { return false;  } 
    }
    public decimal OtherMoney
    {
        get{ return _OtherMoney;  }
        set
		{
			_OtherMoney = value;
			IsSetOtherMoney = true;
		}
    }
    public bool IsSetTotalPay; 
    public bool IsTotalPayNullable   
    { 
		get { return false;  } 
    }
    public double TotalPay
    {
        get{ return _TotalPay;  }
        set
		{
			_TotalPay = value;
			IsSetTotalPay = true;
		}
    }
    public bool IsSetCusID; 
    public bool IsCusIDNullable   
    { 
		get { return false;  } 
    }
    public string CusID
    {
        get{ return _CusID;  }
        set
		{
			_CusID = value;
			IsSetCusID = true;
		}
    }
    public bool IsSetCusName; 
    public bool IsCusNameNullable   
    { 
		get { return false;  } 
    }
    public string CusName
    {
        get{ return _CusName;  }
        set
		{
			_CusName = value;
			IsSetCusName = true;
		}
    }
    public bool IsSetPaymented; 
    public bool IsPaymentedNullable   
    { 
		get { return false;  } 
    }
    public double Paymented
    {
        get{ return _Paymented;  }
        set
		{
			_Paymented = value;
			IsSetPaymented = true;
		}
    }
    public bool IsSetUserName; 
    public bool IsUserNameNullable   
    { 
		get { return false;  } 
    }
    public string UserName
    {
        get{ return _UserName;  }
        set
		{
			_UserName = value;
			IsSetUserName = true;
		}
    }
    public bool IsSetIDPOS; 
    public bool IsIDPOSNullable   
    { 
		get { return false;  } 
    }
    public string IDPOS
    {
        get{ return _IDPOS;  }
        set
		{
			_IDPOS = value;
			IsSetIDPOS = true;
		}
    }
public QT_EXPORTDETAIL_MENUList QT_EXPORTDETAIL_MENUList 
{ 
	get { return _listQT_EXPORTDETAIL_MENU; }
	set { _listQT_EXPORTDETAIL_MENU = value;}
}
public QT_EXPORTDETAIL_MENU_TEMPList QT_EXPORTDETAIL_MENU_TEMPList 
{ 
	get { return _listQT_EXPORTDETAIL_MENU_TEMP; }
	set { _listQT_EXPORTDETAIL_MENU_TEMP = value;}
}
public QT_EXPORTDETAIL_METERIALList QT_EXPORTDETAIL_METERIALList 
{ 
	get { return _listQT_EXPORTDETAIL_METERIAL; }
	set { _listQT_EXPORTDETAIL_METERIAL = value;}
}
public QT_EXPORTDETAIL_METERIAL_TEMPList QT_EXPORTDETAIL_METERIAL_TEMPList 
{ 
	get { return _listQT_EXPORTDETAIL_METERIAL_TEMP; }
	set { _listQT_EXPORTDETAIL_METERIAL_TEMP = value;}
}
public QT_TABLERENTList QT_TABLERENTList 
{ 
	get { return _listQT_TABLERENT; }
	set { _listQT_TABLERENT = value;}
}
public QT_TABLERENT_TEMPList QT_TABLERENT_TEMPList 
{ 
	get { return _listQT_TABLERENT_TEMP; }
	set { _listQT_TABLERENT_TEMP = value;}
}

        #endregion

        #region Constructors
        public QT_EXPORTBILL()
        {
            Reset();
        }
        public QT_EXPORTBILL(QT_EXPORTBILL obj)
        {
            	this._BillID = obj.BillID;
	this._TypeBill = obj.TypeBill;
	this._ExportDate = obj.ExportDate;
	this._PayID = obj.PayID;
	this._Note = obj.Note;
	this._TableID = obj.TableID;
	this._PromotionID = obj.PromotionID;
	this._PromotionMoney = obj.PromotionMoney;
	this._VAT = obj.VAT;
	this._TableMoney = obj.TableMoney;
	this._ServiceMoney = obj.ServiceMoney;
	this._OtherMoney = obj.OtherMoney;
	this._TotalPay = obj.TotalPay;
	this._CusID = obj.CusID;
	this._CusName = obj.CusName;
	this._Paymented = obj.Paymented;
	this._UserName = obj.UserName;
	this._IDPOS = obj.IDPOS;
        }
        #endregion

        public void Reset()
        {
                     _BillID = EmptyValues.v_string;
         _TypeBill = EmptyValues.v_string;
         _ExportDate = EmptyValues.v_DateTime;
         _PayID = EmptyValues.v_Int32;
         _Note = EmptyValues.v_string;
         _TableID = EmptyValues.v_string;
         _PromotionID = EmptyValues.v_string;
         _PromotionMoney = EmptyValues.v_decimal;
         _VAT = EmptyValues.v_double;
         _TableMoney = EmptyValues.v_decimal;
         _ServiceMoney = EmptyValues.v_decimal;
         _OtherMoney = EmptyValues.v_decimal;
         _TotalPay = EmptyValues.v_double;
         _CusID = EmptyValues.v_string;
         _CusName = EmptyValues.v_string;
         _Paymented = EmptyValues.v_double;
         _UserName = EmptyValues.v_string;
         _IDPOS = EmptyValues.v_string;
	_listQT_EXPORTDETAIL_MENU = null;
	_listQT_EXPORTDETAIL_MENU_TEMP = null;
	_listQT_EXPORTDETAIL_METERIAL = null;
	_listQT_EXPORTDETAIL_METERIAL_TEMP = null;
	_listQT_TABLERENT = null;
	_listQT_TABLERENT_TEMP = null;
        }

         
        #region Hidden

        /*
        private void readProperties(IDataReader reader)
        {
            try
            {
                                if(!(reader["BillID"] is DBNull))
		{
			obj.BillID = (string)reader["BillID"];
		}
                if(!(reader["TypeBill"] is DBNull))
		{
			obj.TypeBill = (string)reader["TypeBill"];
		}
                if(!(reader["ExportDate"] is DBNull))
		{
			obj.ExportDate = (DateTime)reader["ExportDate"];
		}
                if(!(reader["PayID"] is DBNull))
		{
			obj.PayID = (Int32)reader["PayID"];
		}
                if(!(reader["Note"] is DBNull))
		{
			obj.Note = (string)reader["Note"];
		}
                if(!(reader["TableID"] is DBNull))
		{
			obj.TableID = (string)reader["TableID"];
		}
                if(!(reader["PromotionID"] is DBNull))
		{
			obj.PromotionID = (string)reader["PromotionID"];
		}
                if(!(reader["PromotionMoney"] is DBNull))
		{
			obj.PromotionMoney = (decimal)reader["PromotionMoney"];
		}
                if(!(reader["VAT"] is DBNull))
		{
			obj.VAT = (double)reader["VAT"];
		}
                if(!(reader["TableMoney"] is DBNull))
		{
			obj.TableMoney = (decimal)reader["TableMoney"];
		}
                if(!(reader["ServiceMoney"] is DBNull))
		{
			obj.ServiceMoney = (decimal)reader["ServiceMoney"];
		}
                if(!(reader["OtherMoney"] is DBNull))
		{
			obj.OtherMoney = (decimal)reader["OtherMoney"];
		}
                if(!(reader["TotalPay"] is DBNull))
		{
			obj.TotalPay = (double)reader["TotalPay"];
		}
                if(!(reader["CusID"] is DBNull))
		{
			obj.CusID = (string)reader["CusID"];
		}
                if(!(reader["CusName"] is DBNull))
		{
			obj.CusName = (string)reader["CusName"];
		}
                if(!(reader["Paymented"] is DBNull))
		{
			obj.Paymented = (double)reader["Paymented"];
		}
                if(!(reader["UserName"] is DBNull))
		{
			obj.UserName = (string)reader["UserName"];
		}
                if(!(reader["IDPOS"] is DBNull))
		{
			obj.IDPOS = (string)reader["IDPOS"];
		}
//            _BillID = (reader["BillID"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["BillID"];
//            _TypeBill = (reader["TypeBill"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["TypeBill"];
//            _ExportDate = (reader["ExportDate"] is DBNull)?DalTools.EmptyValues.v_DateTime:(DateTime)reader["ExportDate"];
//            _PayID = (reader["PayID"] is DBNull)?DalTools.EmptyValues.v_Int32:(Int32)reader["PayID"];
//            _Note = (reader["Note"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["Note"];
//            _TableID = (reader["TableID"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["TableID"];
//            _PromotionID = (reader["PromotionID"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["PromotionID"];
//            _PromotionMoney = (reader["PromotionMoney"] is DBNull)?DalTools.EmptyValues.v_decimal:(decimal)reader["PromotionMoney"];
//            _VAT = (reader["VAT"] is DBNull)?DalTools.EmptyValues.v_double:(double)reader["VAT"];
//            _TableMoney = (reader["TableMoney"] is DBNull)?DalTools.EmptyValues.v_decimal:(decimal)reader["TableMoney"];
//            _ServiceMoney = (reader["ServiceMoney"] is DBNull)?DalTools.EmptyValues.v_decimal:(decimal)reader["ServiceMoney"];
//            _OtherMoney = (reader["OtherMoney"] is DBNull)?DalTools.EmptyValues.v_decimal:(decimal)reader["OtherMoney"];
//            _TotalPay = (reader["TotalPay"] is DBNull)?DalTools.EmptyValues.v_double:(double)reader["TotalPay"];
//            _CusID = (reader["CusID"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["CusID"];
//            _CusName = (reader["CusName"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["CusName"];
//            _Paymented = (reader["Paymented"] is DBNull)?DalTools.EmptyValues.v_double:(double)reader["Paymented"];
//            _UserName = (reader["UserName"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["UserName"];
//            _IDPOS = (reader["IDPOS"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["IDPOS"];
            }
            catch (Exception ex)
            {
                throw new DalException("Failed to read properties from DataReader.", ex);
            }
        } 
        */

        #endregion


        public void Fill(string BillID, string TypeBill, DateTime ExportDate, Int32 PayID, string Note, string TableID, string PromotionID, decimal PromotionMoney, double VAT, decimal TableMoney, decimal ServiceMoney, decimal OtherMoney, double TotalPay, string CusID, string CusName, double Paymented, string UserName, string IDPOS)
        {
                     this._BillID = BillID;
         this._TypeBill = TypeBill;
         this._ExportDate = ExportDate;
         this._PayID = PayID;
         this._Note = Note;
         this._TableID = TableID;
         this._PromotionID = PromotionID;
         this._PromotionMoney = PromotionMoney;
         this._VAT = VAT;
         this._TableMoney = TableMoney;
         this._ServiceMoney = ServiceMoney;
         this._OtherMoney = OtherMoney;
         this._TotalPay = TotalPay;
         this._CusID = CusID;
         this._CusName = CusName;
         this._Paymented = Paymented;
         this._UserName = UserName;
         this._IDPOS = IDPOS;
        }
    }
}